﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CSM_SQL.DAL;

namespace CSM_SQL.BLL
{
    public class EmpBLL
    {
        private EmpDAL _EmpDal;

        private EmpDAL EmpDal
        {
            get
            {
                if (_EmpDal == null)
                    _EmpDal = new EmpDAL();
                return _EmpDal;
            }
        }

        public List<Emp> All()
        {
            return EmpDal.All();
        }

        public List<Emp_Ord> GetOrder(int ID)
        {
            return EmpDal.GetOrder(ID);
        }

        public Boolean Add(Emp emp)
        {
            return EmpDal.Add(emp);
        }

        public Boolean ChangeState(int ID,int state)
        {
            return EmpDal.ChangeState(ID, state);
        }

        public Boolean Send(int id)
        {
            return EmpDal.Send(id);
        }

        public List<AssessMsg> GetAssess()
        {
            return EmpDal.GetAssess();
        }

        public Boolean ChangePwd(Emp e)
        {
            return EmpDal.ChangePwd(e);
        }

        public List<Apply> GetApply()
        {
            return EmpDal.GetApply();
        }

        public Boolean Reply(int id,int val)
        {
            return EmpDal.Reply(id, val);
        }

        public List<Income> getIncomeTable(DateTime startTime, DateTime endTime)
        {
            return EmpDal.getIncomeTable(startTime, endTime);
        }

        static public void Timer()
        {
            EmpDAL.Timer();
        }

    }
}
